package team.future.joke.util;


/*import org.apache.commons.configuration.PropertiesConfiguration;

import com.spinn3r.log5j.Logger;*/

/**
 * Title: Config.java<br>
 * Description: <br>
 * Copyright (c) 未来工作室版权所有 2015    <br>
 * Create DateTime: 2015年8月31日 下午2:46:35 <br>
 * @author futurezhu
 */
public class Config {
	/*private static final Logger logger = Logger.getLogger();
	
	private static String DEFAULT_CONF_FILE;
	
	static {
		DEFAULT_CONF_FILE = "/server.properties";
	}
	
	private static final String DEFAULT_CONFIG_FILEPATH = Config.class.getResource(DEFAULT_CONF_FILE).getFile();
	
	private static PropertiesConfiguration config = new PropertiesConfiguration();
	
	static {
		try {
			logger.info("load config file[%s]", DEFAULT_CONF_FILE);
			config.load(DEFAULT_CONFIG_FILEPATH);
		} catch (Exception e) {
			logger.error("Read Properties Config File Error.", e);
		}
	}
	
	public static String getString(String key, String defaultValue) {
		return config.getString(key, defaultValue);
	}
	
	public static String getString(String key) {
		return config.getString(key, null);
	}
	
	public static int getInt(String key, int defaultValue) {
		return config.getInt(key, defaultValue);
	}
	
	public static int getInt(String key) {
		return config.getInt(key, 0);
	}
	
	public static String[] getStringArray(String key) {
		return config.getStringArray(key);
	}
	
	public static boolean getBoolean(String key, boolean defaultValue) {
		return config.getBoolean(key, defaultValue);
	}
	
	public static boolean getBoolean(String key) {
		return config.getBoolean(key, false);
	}
	
	public static float getFloat(String key, float defaultValue) {
		return config.getFloat(key, defaultValue);
	}
	
	public static float getFloat(String key) {
		return config.getFloat(key, 0);
	}*/
}
